﻿
namespace InfoPathHelpers.Validation
{
    /// <summary>
    /// This class can be used to hold message and details to be displayed by FormErrors or message boxes
    /// which are 
    /// </summary>
    public class ValidationMessage
    {
        /// <summary>
        /// Initializes a new instance of the ValidationMessage class.
        /// </summary>
        public ValidationMessage() { }

        /// <summary>
        /// Initializes a new instance of the ValidationMessage class with the supplied parameters.
        /// </summary>
        /// <param name="caption">Used as the caption for any MessageBox displayed.</param>
        /// <param name="message">Used as the short message in any FormErrors reported.</param>
        /// <param name="messageDetails">Used for both MessageBox content and FormError.MessageDetails</param>
        public ValidationMessage(string caption, string message, string messageDetails)
        {
            this.Caption = caption;
            this.Message = message;
            this.MessageDetails = messageDetails;
        }

        /// <summary>
        /// Used as the caption for any MessageBox displayed.
        /// </summary>
        public string Caption { get; set; }

        /// <summary>
        /// Used as the short message in any FormErrors reported.
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// Used for both MessageBox content and FormError.MessageDetails
        /// </summary>
        public string MessageDetails { get; set; }
    }
}
